import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.Job
import kotlinx.coroutines.launch
import java.lang.Exception

class UnloadingPort {
    private val scope: CoroutineScope = CoroutineScope(Job() + Dispatchers.Default)
    var isWorking: Boolean = false
    fun unload(truck: AbstractTruck) {
        scope.launch {
            isWorking = true
            TruckEvents().unLoad(truck)
            isWorking = false
        }
    }
}